I'm having a problem but I can not see the reason why it is occurring. unassigned variable (newBS)
Can somebody help me see where or what I'm doing wrong?
void addBSD(){
BaselineSetDefinition BSD
BaselineSet newBS
Item i
Folder f = current
Skip moduleSkip = create
bool major = true
int selItemToken
ModName_ selMod
string bsdescription = get(bsDescInput)
for BSD in current Folder do
{
lock(BSD)
for (selItemToken=0; selItemToken<noElems(selectedListView); selItemToken++) {
raise(selectModulesDB)
i = item(get(selectedListView, selItemToken))
if (type(i) == "Formal"){
string modpath = fullName(i)
selMod = module(modpath)
addModule(selMod, BSD)
put(moduleSkip, selItemToken, selMod)
}
}
create(BSD, major, "", bsdescription, newBS) // <--- the baseline will be major (ie: 1.0, 2.0, 3.0 ...)
unlock(BSD)
string check = addBaselines(moduleSkip, newBS)
close(newBS)
}
save(BSD)
delete(moduleSkip)
}
Bruwbruw - Wed Jul 08 08:43:13 EDT 2015 |
Re: BaselineSet The create function returns a string, which is an error message. If the string is null, the BaselineSet was successfully created. Otherwise, an error occurred. You need to make sure the BaselineSet is successfully created before you try to use it as you do on line 30. From the DXL reference manual, are both of these conditions properly satisfied? "This fails if the Baseline Set Definition is not locked by the user, or if there is already an Open baseline set for it." |